home *** CD-ROM | disk | FTP | other *** search
- public class DisciplinePotence extends Discipline {
- private static final String DISCIPLINE_NAME = "Potence";
-
- public int cast(int level, int casterGuid) {
- if (!((Discipline)this).CheckCastParameters(level, casterGuid, "Potence")) {
- return 0;
- } else if (((Discipline)this).Fizzled(level)) {
- ((Discipline)this).DisplayFizzle("Potence", level);
- return 0;
- } else {
- try {
- int effectGuid = super.casterThing.FindActorEffect("ef_disc_potence");
- if (effectGuid != 0) {
- super.casterThing.ExpandActorEffect(effectGuid, Discipline.POTENCE_DURATIONS[level], false);
- ((Discipline)this).DisplayCast("Potence", level);
- } else {
- super.casterThing.AddActorEffectByLevel("ef_disc_potence", Discipline.POTENCE_DURATIONS[level], level, casterGuid, 4);
- ((Discipline)this).DisplayCast("Potence", level);
- }
-
- return 1;
- } catch (Exception var5) {
- CodexConsole.PrintException(((Throwable)var5).getMessage() + " in " + "Potence" + " [cast]");
- return 0;
- } catch (Error var6) {
- CodexConsole.PrintError(((Throwable)var6).getMessage() + " in " + "Potence" + " [cast]");
- return 0;
- }
- }
- }
- }
-